package com.catsic.mod.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.catsic.base.BaseEntity;
import com.catsic.core.entity.User;

/**
 * @author cs
 * 收件箱实体类
 */
@Entity
@Table(name="S_RECEIVEMESSAGE")
public class ReceiveMessage extends BaseEntity implements Serializable {
		
	/**
	 * 
	 */
	private static final long serialVersionUID = -7484354419263846957L;

	
	/**
	 * 标题
	 */
	@Column(name="TITLE")
	private String title;
	
	/**
	 * 内容
	 */
	@Column(name="CONTENT",length=4000)
	private String content;
	
	/**
	 * 发送人(用户)
	 */
	@ManyToOne(fetch=FetchType.LAZY,optional=false)
	@JoinColumn(name="USERID",referencedColumnName = "ID")
	private User user;
	
	/**
	 * 收件人ID
	 */
	@Column(name="ADDRESSEEID")
	private String addresseeId;
	
	/**
	 * 收件人名
	 */
	@Column(name="ADDRESSEENAME")
	private String addresseeName;
	
	/**
	 * 收件人类型ID
	 * 抽屉表 机构 角色 用户
	 */
	@Column(name="ADDRESSEETYPECODE")
	private String code;

	/**
	 * 收件人类型名称
	 * 抽屉表 机构 角色 用户
	 */
	@Column(name="ADDRESSEETYPENAME")
	private String addresseeTypeName;
	
	/**
	 * 发件
	 **/
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="SENDMESSAGE_ID",referencedColumnName = "ID")
	private SendMessage sendMessage;
	
	/**
	 * 手机提醒
	 */
	@Column(name="REMIND")
	private String remind;


	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getAddresseeId() {
		return addresseeId;
	}

	public void setAddresseeId(String addresseeId) {
		this.addresseeId = addresseeId;
	}

	public String getAddresseeName() {
		return addresseeName;
	}

	public void setAddresseeName(String addresseeName) {
		this.addresseeName = addresseeName;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getAddresseeTypeName() {
		return addresseeTypeName;
	}

	public void setAddresseeTypeName(String addresseeTypeName) {
		this.addresseeTypeName = addresseeTypeName;
	}

	public SendMessage getSendMessage() {
		return sendMessage;
	}

	public void setSendMessage(SendMessage sendMessage) {
		this.sendMessage = sendMessage;
	}

	public String getRemind() {
		return remind;
	}

	public void setRemind(String remind) {
		this.remind = remind;
	}

		
}
